package net.dodoman.file;
import java.io.File;

public class FileTest {
	public static void main(String[] args) throws Exception {

		System.out.println("a:"
				+ Thread.currentThread().getContextClassLoader()
						.getResource(""));
		System.out.println("b:"
				+ FileTest.class.getClassLoader().getResource(""));
		System.out.println("c:" + ClassLoader.getSystemResource(""));
		System.out.println("d:" + FileTest.class.getResource(""));
		System.out.println("e:" + FileTest.class.getResource("/")); // Class文件所在路径
		System.out.println("f:" + new File("/").getAbsolutePath());
		System.out.println("g:" + System.getProperty("user.dir"));
		File file = new File("/src/log4j.properties");
		System.out.println("h:" + file.length());
		System.out.println("i:" + file.getAbsolutePath());
	}
}
